package com.xu.sms.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author xupenghao@163.com
 * @date 2018-06-10 22:07
 */
public class DateUtils {

    public final static String YYYY_MM_DD = "yyyy-MM-dd";

    public static String dateToFormatString(Date date, String format){

        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format);
        String result = simpleDateFormat.format(date);

        return result;
    }
}
